package com.spade.controller;

import com.spade.provider.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author quanlong.chan
 * @Title: ProviderController
 * @Description:
 * @date 2019/8/1 11:43
 */
@Controller
@RequestMapping("/hello")
public class ProviderController {


    @Autowired
    private ProviderService providerService;


    @RequestMapping("{name}")
    @ResponseBody
    public String sayHello(@PathVariable("name") String name) {
        String str = providerService.sayHello(name);
        System.out.println(str);
        return str;
    }
}
